/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package system.impl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

import system.RestParameter;
import system.SystemPackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Rest Parameter</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link system.impl.RestParameterImpl#getPathParameter <em>Path Parameter</em>}</li>
 *   <li>{@link system.impl.RestParameterImpl#getQueryParameter <em>Query Parameter</em>}</li>
 *   <li>{@link system.impl.RestParameterImpl#getFormParameter <em>Form Parameter</em>}</li>
 *   <li>{@link system.impl.RestParameterImpl#getFormDataParameter <em>Form Data Parameter</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class RestParameterImpl extends ParameterImpl implements RestParameter {
	/**
	 * The default value of the '{@link #getPathParameter() <em>Path Parameter</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPathParameter()
	 * @generated
	 * @ordered
	 */
	protected static final String PATH_PARAMETER_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getPathParameter() <em>Path Parameter</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPathParameter()
	 * @generated
	 * @ordered
	 */
	protected String pathParameter = PATH_PARAMETER_EDEFAULT;

	/**
	 * The default value of the '{@link #getQueryParameter() <em>Query Parameter</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getQueryParameter()
	 * @generated
	 * @ordered
	 */
	protected static final String QUERY_PARAMETER_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getQueryParameter() <em>Query Parameter</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getQueryParameter()
	 * @generated
	 * @ordered
	 */
	protected String queryParameter = QUERY_PARAMETER_EDEFAULT;

	/**
	 * The default value of the '{@link #getFormParameter() <em>Form Parameter</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getFormParameter()
	 * @generated
	 * @ordered
	 */
	protected static final String FORM_PARAMETER_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getFormParameter() <em>Form Parameter</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getFormParameter()
	 * @generated
	 * @ordered
	 */
	protected String formParameter = FORM_PARAMETER_EDEFAULT;

	/**
	 * The default value of the '{@link #getFormDataParameter() <em>Form Data Parameter</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getFormDataParameter()
	 * @generated
	 * @ordered
	 */
	protected static final String FORM_DATA_PARAMETER_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getFormDataParameter() <em>Form Data Parameter</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getFormDataParameter()
	 * @generated
	 * @ordered
	 */
	protected String formDataParameter = FORM_DATA_PARAMETER_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected RestParameterImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return SystemPackage.Literals.REST_PARAMETER;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getPathParameter() {
		return pathParameter;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setPathParameter(String newPathParameter) {
		String oldPathParameter = pathParameter;
		pathParameter = newPathParameter;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SystemPackage.REST_PARAMETER__PATH_PARAMETER, oldPathParameter, pathParameter));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getQueryParameter() {
		return queryParameter;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setQueryParameter(String newQueryParameter) {
		String oldQueryParameter = queryParameter;
		queryParameter = newQueryParameter;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SystemPackage.REST_PARAMETER__QUERY_PARAMETER, oldQueryParameter, queryParameter));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getFormParameter() {
		return formParameter;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setFormParameter(String newFormParameter) {
		String oldFormParameter = formParameter;
		formParameter = newFormParameter;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SystemPackage.REST_PARAMETER__FORM_PARAMETER, oldFormParameter, formParameter));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getFormDataParameter() {
		return formDataParameter;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setFormDataParameter(String newFormDataParameter) {
		String oldFormDataParameter = formDataParameter;
		formDataParameter = newFormDataParameter;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SystemPackage.REST_PARAMETER__FORM_DATA_PARAMETER, oldFormDataParameter, formDataParameter));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case SystemPackage.REST_PARAMETER__PATH_PARAMETER:
				return getPathParameter();
			case SystemPackage.REST_PARAMETER__QUERY_PARAMETER:
				return getQueryParameter();
			case SystemPackage.REST_PARAMETER__FORM_PARAMETER:
				return getFormParameter();
			case SystemPackage.REST_PARAMETER__FORM_DATA_PARAMETER:
				return getFormDataParameter();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case SystemPackage.REST_PARAMETER__PATH_PARAMETER:
				setPathParameter((String)newValue);
				return;
			case SystemPackage.REST_PARAMETER__QUERY_PARAMETER:
				setQueryParameter((String)newValue);
				return;
			case SystemPackage.REST_PARAMETER__FORM_PARAMETER:
				setFormParameter((String)newValue);
				return;
			case SystemPackage.REST_PARAMETER__FORM_DATA_PARAMETER:
				setFormDataParameter((String)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case SystemPackage.REST_PARAMETER__PATH_PARAMETER:
				setPathParameter(PATH_PARAMETER_EDEFAULT);
				return;
			case SystemPackage.REST_PARAMETER__QUERY_PARAMETER:
				setQueryParameter(QUERY_PARAMETER_EDEFAULT);
				return;
			case SystemPackage.REST_PARAMETER__FORM_PARAMETER:
				setFormParameter(FORM_PARAMETER_EDEFAULT);
				return;
			case SystemPackage.REST_PARAMETER__FORM_DATA_PARAMETER:
				setFormDataParameter(FORM_DATA_PARAMETER_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case SystemPackage.REST_PARAMETER__PATH_PARAMETER:
				return PATH_PARAMETER_EDEFAULT == null ? pathParameter != null : !PATH_PARAMETER_EDEFAULT.equals(pathParameter);
			case SystemPackage.REST_PARAMETER__QUERY_PARAMETER:
				return QUERY_PARAMETER_EDEFAULT == null ? queryParameter != null : !QUERY_PARAMETER_EDEFAULT.equals(queryParameter);
			case SystemPackage.REST_PARAMETER__FORM_PARAMETER:
				return FORM_PARAMETER_EDEFAULT == null ? formParameter != null : !FORM_PARAMETER_EDEFAULT.equals(formParameter);
			case SystemPackage.REST_PARAMETER__FORM_DATA_PARAMETER:
				return FORM_DATA_PARAMETER_EDEFAULT == null ? formDataParameter != null : !FORM_DATA_PARAMETER_EDEFAULT.equals(formDataParameter);
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (pathParameter: ");
		result.append(pathParameter);
		result.append(", queryParameter: ");
		result.append(queryParameter);
		result.append(", formParameter: ");
		result.append(formParameter);
		result.append(", formDataParameter: ");
		result.append(formDataParameter);
		result.append(')');
		return result.toString();
	}

} //RestParameterImpl
